package com.glasses.primework;

import javax.faces.bean.ManagedBean;
import org.primefaces.event.RateEvent;

@ManagedBean
public class Rating {
    private Integer rating;
    
    public Integer getRating() {
        System.out.println("Rating.getRating()");
        return rating;
    }
    
    public void setRating(Integer rating) {
        System.out.println("Rating.setRating(" + rating + ")");
        this.rating = rating;
    }
    
    public void handleRate(RateEvent rateEvent) {
        System.out.println("Rating.handleRate(" + rateEvent + ")");
        Integer rate = (Integer) rateEvent.getRating();
        //Add facesmessage
    }
    public void handleCancel() {
        System.out.println("Rating.handleCancel()");
        //Add facesmessage
    }
}
